package net.zjitc.tree;

public class TreeNode<T> {
    T data;
    TreeNode left;
    TreeNode right;

    public TreeNode() {
    }

    public TreeNode(T data) {
        this.data = data;
    }

    public TreeNode(TreeNode left, T data) {
        this.data = data;
        this.left = left;
    }

    public TreeNode(TreeNode data, TreeNode right) {
        this.data = (T) data;
        this.right = right;
    }

    public TreeNode(T data, TreeNode left, TreeNode right) {
        this.data = data;
        this.left = left;
        this.right = right;
    }
}
